<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

	<head>
		<meta charset="utf-8">
		<title>thandle</title>
		<link rel="stylesheet" type="text/css" href="test.css" />
	</head>

	<body>
		<div id="content">
			<div id="data-section">
				<table class="data-table1" cellspacing="0" cellpadding="0" border="1" bordercolor="#DBE2E7">
					<caption>Smart replenishment</caption>
					<tr>
						<th>No</th>
						<th>Code</th>
						<th>Name</th>
						<th>Color</th>
						<th>Size</th>
						<th>Last week's sales</th>
						<th>Inventory</th>
						<th>Headquarters inventory</th>
						<th>Forecast sales next week</th>
						<th>Safety stock</th>
						<th>Image</th>
						<th>Replenishment proposal</th>
					</tr>
				</table>
			</div>
		</div>
		</div>
		<script src="../js/thandle.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="jquery-1.11.0.js"></script>
		<script type="text/javascript" src="../js/tsort.js"></script>
		<script type="text/javascript">
			var j = [
						['1', 'A1201111', 'Men\'s jacket', 'black', 'M', 1, '', 20, 3, 5, '<img src="img/1.png" />',7],
						['1', 'A1201111', 'Men\'s jacket', 'white', 'S', 3, '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'black', 'S', 2, 1, 20, 3, 5, '<img src="img/1.png" />',7],
						['1', 'A1201111', 'Men\'s jacket', 'black', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'white', 'M', 2, '', 20, 3, 5, '<img src="img/1.png" />',7],
						['1', 'A1201111', 'Men\'s jacket', 'black', 'M', 1, '', 20, 3, 5, '<img src="img/1.png" />',7],
						['1', 'A1201111', 'Men\'s jacket', 'white', 'S', 3, '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'black', 'S', 2, 1, 20, 3, 5, '<img src="img/1.png" />',7],
						['1', 'A1201111', 'Men\'s jacket', 'black', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'red', 'M', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'red', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'red', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'red', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7], 
						['1', 'A1201111', 'Men\'s jacket', 'white', 'L', '', '', 20, 3, 5, '<img src="img/1.png" />',7]
					];
			var n = thandle.format({data:j,rowspan:[0,1,2,3,4,10],sort:true});
			var trs = "";
			for(var i=0;i<n.length;i++){
				trs +="<tr>";
				for(var j=0;j<n[i].getColumns().length;j++){
					trs+='<td rowspan="'+n[i].get(j).rowspan+'">';
					trs+=n[i].get(j).value;
					trs+='</td>';
				}
				trs +="</tr>";
			}
			$(".data-table1").append(trs);
		</script>
	</body>

</html>